package com.ruoyi.whzj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.whzj.mapper.WhActivityUserMapper;
import com.ruoyi.whzj.domain.WhActivityUser;
import com.ruoyi.whzj.service.IWhActivityUserService;
import com.ruoyi.common.core.text.Convert;

/**
 * 活动参与人员Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-10-22
 */
@Service
public class WhActivityUserServiceImpl implements IWhActivityUserService 
{
    @Autowired
    private WhActivityUserMapper whActivityUserMapper;

    /**
     * 查询活动参与人员
     * 
     * @param id 活动参与人员ID
     * @return 活动参与人员
     */
    @Override
    public WhActivityUser selectWhActivityUserById(String id)
    {
        return whActivityUserMapper.selectWhActivityUserById(id);
    }

    /**
     * 查询活动参与人员列表
     * 
     * @param whActivityUser 活动参与人员
     * @return 活动参与人员
     */
    @Override
    public List<WhActivityUser> selectWhActivityUserList(WhActivityUser whActivityUser)
    {
        return whActivityUserMapper.selectWhActivityUserList(whActivityUser);
    }

    /**
     * 新增活动参与人员
     * 
     * @param whActivityUser 活动参与人员
     * @return 结果
     */
    @Override
    public int insertWhActivityUser(WhActivityUser whActivityUser)
    {
        whActivityUser.setCreateTime(DateUtils.getNowDate());
        return whActivityUserMapper.insertWhActivityUser(whActivityUser);
    }

    /**
     * 修改活动参与人员
     * 
     * @param whActivityUser 活动参与人员
     * @return 结果
     */
    @Override
    public int updateWhActivityUser(WhActivityUser whActivityUser)
    {
        return whActivityUserMapper.updateWhActivityUser(whActivityUser);
    }

    /**
     * 删除活动参与人员对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWhActivityUserByIds(String ids)
    {
        return whActivityUserMapper.deleteWhActivityUserByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除活动参与人员信息
     * 
     * @param id 活动参与人员ID
     * @return 结果
     */
    @Override
    public int deleteWhActivityUserById(String id)
    {
        return whActivityUserMapper.deleteWhActivityUserById(id);
    }
}
